<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let name = "www",
        age = "17";
      let obj = {
        name: "aaa",
        objAge: this.age,
        myFun: function (fm, t) {
          console.log(this.name + "年龄" + this.age, "来自" + fm + "去" + t);
        },
      };
      let db = {
        name: "bbb",
        age: 12,
      };
      obj.myFun.call(db, "成都", "上海");
      obj.myFun.apply(db, ["成都", "上海"]);
      obj.myFun.bind(db, "成都", "上海")(); ///bbb年龄12
    </script>
  </body>
</html>
